package com.ruoyi.consume.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.consume.mapper.GreenhousefilmConsumeTemporaryMapper;
import com.ruoyi.consume.domain.GreenhousefilmConsumeTemporary;
import com.ruoyi.consume.service.IGreenhousefilmConsumeTemporaryService;

/**
 * 查看临时领用信息Service业务层处理
 *
 * @author ruoyi
 * @date 2021-07-27
 */
@Service
public class GreenhousefilmConsumeTemporaryServiceImpl implements IGreenhousefilmConsumeTemporaryService
{
    @Autowired
    private GreenhousefilmConsumeTemporaryMapper greenhousefilmConsumeTemporaryMapper;

    /**
     * 查询查看临时领用信息
     *
     * @param greenhousefilmConsumeTemporaryId 查看临时领用信息ID
     * @return 查看临时领用信息
     */
    @Override
    public GreenhousefilmConsumeTemporary selectGreenhousefilmConsumeTemporaryById(Long greenhousefilmConsumeTemporaryId)
    {
        return greenhousefilmConsumeTemporaryMapper.selectGreenhousefilmConsumeTemporaryById(greenhousefilmConsumeTemporaryId);
    }

    /**
     * 查询查看临时领用信息列表
     *
     * @param greenhousefilmConsumeTemporary 查看临时领用信息
     * @return 查看临时领用信息
     */
    @Override
    public List<GreenhousefilmConsumeTemporary> selectGreenhousefilmConsumeTemporaryList(GreenhousefilmConsumeTemporary greenhousefilmConsumeTemporary)
    {
        return greenhousefilmConsumeTemporaryMapper.selectGreenhousefilmConsumeTemporaryList(greenhousefilmConsumeTemporary);
    }

    /**
     * 新增查看临时领用信息
     *
     * @param greenhousefilmConsumeTemporary 查看临时领用信息
     * @return 结果
     */
    @Override
    public int insertGreenhousefilmConsumeTemporary(GreenhousefilmConsumeTemporary greenhousefilmConsumeTemporary)
    {
        greenhousefilmConsumeTemporary.setCreateTime(DateUtils.getNowDate());
        return greenhousefilmConsumeTemporaryMapper.insertGreenhousefilmConsumeTemporary(greenhousefilmConsumeTemporary);
    }

    /**
     * 修改查看临时领用信息
     *
     * @param greenhousefilmConsumeTemporary 查看临时领用信息
     * @return 结果
     */
    @Override
    public int updateGreenhousefilmConsumeTemporary(GreenhousefilmConsumeTemporary greenhousefilmConsumeTemporary)
    {
        greenhousefilmConsumeTemporary.setUpdateTime(DateUtils.getNowDate());
        return greenhousefilmConsumeTemporaryMapper.updateGreenhousefilmConsumeTemporary(greenhousefilmConsumeTemporary);
    }

    /**
     * 批量删除查看临时领用信息
     *
     * @param greenhousefilmConsumeTemporaryIds 需要删除的查看临时领用信息ID
     * @return 结果
     */
    @Override
    public int deleteGreenhousefilmConsumeTemporaryByIds(Long[] greenhousefilmConsumeTemporaryIds)
    {
        return greenhousefilmConsumeTemporaryMapper.deleteGreenhousefilmConsumeTemporaryByIds(greenhousefilmConsumeTemporaryIds);
    }

    /**
     * 删除查看临时领用信息信息
     *
     * @param greenhousefilmConsumeTemporaryId 查看临时领用信息ID
     * @return 结果
     */
    @Override
    public int deleteGreenhousefilmConsumeTemporaryById(Long greenhousefilmConsumeTemporaryId)
    {
        return greenhousefilmConsumeTemporaryMapper.deleteGreenhousefilmConsumeTemporaryById(greenhousefilmConsumeTemporaryId);
    }

    /**
     * 获取用户下拉框
     *
     * @param
     * @return 结果
     */
    @Override
    public List<GreenhousefilmConsumeTemporary> getUserName(){
        return greenhousefilmConsumeTemporaryMapper.getUserName();
    }
}
